import { DIFY_API_V1_URL_zhengci, VITE_APP_API_KEY } from '@/constants/dify'
export default function fetchRequest(url: string, options: any) {
  const baseURL = DIFY_API_V1_URL_zhengci
  const headers = {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${VITE_APP_API_KEY}`,
    Accept: 'text/event-stream'
    // token: VITE_APP_API_KEY
  }

  options.headers = {
    ...headers,
    ...options.headers
  }
  return fetch(baseURL + url, options)
}
